home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4030 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: toad.stack.urc.tue.nl!not-for-mail
  2. From: leon@stack.urc.tue.nl (Leon Woestenberg)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Shared library open and close functions
  5. Date: 16 Feb 1996 10:25:28 +0100
  6. Organization: MCGV Stack, Eindhoven University of Technology, the Netherlands.
  7. Message-ID: <4g1ii8$sod@toad.stack.urc.tue.nl>
  8. References: <510.6619T1238T1638@Th0r.foo.bar>
  9. NNTP-Posting-Host: toad.stack.urc.tue.nl
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Christopher Naas (christon) wrote:
  13.  
  14. : I want one function that is called the first time the library is opened, and
  15. : one function that is called when the library is closed by the last user and it
  16. : is flushed from memory.
  17.  
  18. I would suggest doing this:
  19. In Open(): After increasing the usercount, check if it is 1. If so, invoke
  20. myStartFunction().
  21. In Close(): After decreasing the usercount, check if it is 0. If so, invoke
  22. myFinishFunction().
  23.  
  24. This brings me to this question: Is it required for the Close function to
  25. call Expunge when the usecount reached 0?
  26. --
  27. Amiga - The most personal computer
  28. Leon Woestenberg (leon@stack.urc.tue.nl) 
  29. --
  30.